package com.leapp.sk.ui.adapter

import android.content.Context
import android.support.v7.widget.RecyclerView
import com.example.mvp.adapter.BaseLibAdapter
import com.example.mvp.binder.BaseDataBinder
import com.example.mvp.view.BaseRecyclerViewAdapter
import com.leapp.sk.bean.ClassAlbumEntity
import com.leapp.sk.binder.BaseBinder
import com.leapp.sk.viewdelegate.adapter.classs.ClassAlbumAdapterDelegate

/**
 * 班级相册
 * @author  chaohaipeng  on 2018/8/6.
 */
class ClassAlbumAdapter (context: Context, mlist: List<ClassAlbumEntity>) : BaseLibAdapter<ClassAlbumAdapterDelegate, ClassAlbumEntity>(context, mlist){

    /**
     * 数据
     */
    val mList = mlist
    /**
     * 上下文
     */
    val mContext = context

    override fun getDataBinder(): BaseDataBinder<*, *> {
        return BaseBinder()
    }

    override fun bindEvenListener(viewDelegate: ClassAlbumAdapterDelegate?, position: Int) {
    }

    override fun notifyView(viewDelegate: ClassAlbumAdapterDelegate?, position: Int) {
        viewDelegate?.setData(mContext,mList.get(position))
    }

    override fun getDelegateClass(): Class<ClassAlbumAdapterDelegate> {
        return ClassAlbumAdapterDelegate::class.java
    }

}